home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / cocktail / cg.lha / cg / m2c / EvalC3.c < prev    next >
C/C++ Source or Header  |  1992-11-24  |  58KB  |  1,698 lines

  1. #include "SYSTEM_.h"
  2.  
  3. #ifndef DEFINITION_System
  4. #include "System.h"
  5. #endif
  6.  
  7. #ifndef DEFINITION_IO
  8. #include "IO.h"
  9. #endif
  10.  
  11. #ifndef DEFINITION_Tree
  12. #include "Tree.h"
  13. #endif
  14.  
  15. #ifndef DEFINITION_General
  16. #include "General.h"
  17. #endif
  18.  
  19. #ifndef DEFINITION_DynArray
  20. #include "DynArray.h"
  21. #endif
  22.  
  23. #ifndef DEFINITION_IO
  24. #include "IO.h"
  25. #endif
  26.  
  27. #ifndef DEFINITION_Texts
  28. #include "Texts.h"
  29. #endif
  30.  
  31. #ifndef DEFINITION_Sets
  32. #include "Sets.h"
  33. #endif
  34.  
  35. #ifndef DEFINITION_Relations
  36. #include "Relations.h"
  37. #endif
  38.  
  39. #ifndef DEFINITION_TreeC1
  40. #include "TreeC1.h"
  41. #endif
  42.  
  43. #ifndef DEFINITION_TreeC2
  44. #include "TreeC2.h"
  45. #endif
  46.  
  47. #ifndef DEFINITION_EvalC
  48. #include "EvalC.h"
  49. #endif
  50.  
  51. #ifndef DEFINITION_Errors
  52. #include "Errors.h"
  53. #endif
  54.  
  55. #ifndef DEFINITION_Positions
  56. #include "Positions.h"
  57. #endif
  58.  
  59. #ifndef DEFINITION_EvalC
  60. #include "EvalC.h"
  61. #endif
  62.  
  63. #ifndef DEFINITION_Tree
  64. #include "Tree.h"
  65. #endif
  66.  
  67. #ifndef DEFINITION_EvalC3
  68. #include "EvalC3.h"
  69. #endif
  70.  
  71. IO_tFile EvalC3_yyf;
  72. PROC EvalC3_Exit;
  73.  
  74. static SHORTCARD i, i2, j, k, n, MaxBit, MaxInstCount, Check;
  75. static Tree_tTree Node, Attr, ChildsClass;
  76. static BOOLEAN Success, IsStable;
  77. static LONGINT BitIndexSize;
  78. static Tree_tBitIndex gBitIndex;
  79. static Sets_tSet InhIndices;
  80. static LONGINT InhIndexSize;
  81. static struct S_1 {
  82.     SHORTCARD A[1000000 - 1 + 1];
  83. } *InhIndexCount;
  84. static void GenCall ARGS((Tree_tTree t, SHORTCARD j));
  85. static void GenEvalAttr ARGS((Tree_tTree t, INTEGER i));
  86. static void yyAbort ARGS((CHAR yyFunction[], LONGCARD ));
  87. static BOOLEAN yyIsEqual ARGS((BYTE yya[], LONGCARD , BYTE yyb[], LONGCARD ));
  88. struct S_4 {
  89.     union {
  90.         struct {
  91.             struct S_5 {
  92.                 SHORTCARD a;
  93.             } yyR2;
  94.         } V_1;
  95.     } U_1;
  96. };
  97. static void CompBitInfo ARGS((Tree_tTree t));
  98. struct S_6 {
  99.     union {
  100.         char dummy;
  101.     } U_1;
  102. };
  103. static void CompInhIndices ARGS((Tree_tTree t));
  104. struct S_7 {
  105.     union {
  106.         struct {
  107.             struct S_8 {
  108.                 INTEGER b;
  109.             } yyR1;
  110.         } V_1;
  111.     } U_1;
  112. };
  113. static void CountSynAttr ARGS((Tree_tTree t));
  114. struct S_9 {
  115.     union {
  116.         char dummy;
  117.     } U_1;
  118. };
  119. static void TypeName ARGS((Tree_tTree t));
  120. struct S_10 {
  121.     union {
  122.         char dummy;
  123.     } U_1;
  124. };
  125. static void GenS ARGS((Tree_tTree t));
  126. struct S_11 {
  127.     union {
  128.         char dummy;
  129.     } U_1;
  130. };
  131. static void GenE ARGS((Tree_tTree t));
  132. struct S_12 {
  133.     union {
  134.         struct {
  135.             struct S_13 {
  136.                 Sets_tSet ToCompute;
  137.             } yyR1;
  138.         } V_1;
  139.     } U_1;
  140. };
  141. static void CompOutput ARGS((Tree_tTree t));
  142. struct S_14 {
  143.     union {
  144.         char dummy;
  145.     } U_1;
  146. };
  147. static void CompOutput2 ARGS((Tree_tTree t));
  148. struct S_15 {
  149.     union {
  150.         char dummy;
  151.     } U_1;
  152. };
  153. struct S_16 {
  154.     union {
  155.         char dummy;
  156.     } U_1;
  157. };
  158. static INTEGER ToBit1 ARGS((Tree_tTree yyP4, INTEGER yyP3));
  159. struct S_17 {
  160.     union {
  161.         char dummy;
  162.     } U_1;
  163. };
  164. static INTEGER ToBit2 ARGS((Tree_tTree yyP7, Tree_tTree yyP6, SHORTCARD yyP5));
  165. struct S_18 {
  166.     union {
  167.         struct {
  168.             struct S_19 {
  169.                 INTEGER yyV1;
  170.             } yyR1;
  171.         } V_1;
  172.     } U_1;
  173. };
  174. static INTEGER ToAttr ARGS((Tree_tTree yyP9, INTEGER yyP8));
  175. struct S_20 {
  176.     union {
  177.         struct {
  178.             struct S_21 {
  179.                 INTEGER yyV1;
  180.             } yyR1;
  181.         } V_1;
  182.     } U_1;
  183. };
  184. static void yyExit ARGS(());
  185.  
  186.  
  187. static void GenCall
  188. # ifdef __STDC__
  189. (Tree_tTree t, SHORTCARD j)
  190. # else
  191. (t, j)
  192. Tree_tTree t;
  193. SHORTCARD j;
  194. # endif
  195. {
  196.   {
  197.     register Tree_tInstance *W_1 = &t->U_1.V_5.Class.Instance->A[j - 1];
  198.  
  199.     if (SET_IS_SUBSET1(SET_ELEM(Tree_Synthesized) | SET_ELEM(Tree_Left), W_1->Properties)) {
  200.       k = EvalC3_ToBit0(t, (LONGINT)j);
  201.       IO_WriteS(Tree_f, (STRING)"IFNOTIN (", 9L);
  202.       Tree_WN((LONGINT)(k % TreeC1_BSS));
  203.       IO_WriteS(Tree_f, (STRING)", yyt->yyHead.yyIsComp", 22L);
  204.       Tree_WN((LONGINT)(k / TreeC1_BSS));
  205.       IO_WriteS(Tree_f, (STRING)") ", 2L);
  206.       IO_WriteS(Tree_f, (STRING)"yyS", 3L);
  207.       Tree_WN((LONGINT)k);
  208.       IO_WriteS(Tree_f, (STRING)" (yyt); /* ", 11L);
  209.       Tree_WI(W_1->Attribute->U_1.V_9.Child.Name);
  210.       IO_WriteS(Tree_f, (STRING)" */ }", 5L);
  211.       IO_WriteNl(Tree_f);
  212.     } else if (SET_IS_SUBSET1(SET_ELEM(Tree_Inherited) | SET_ELEM(Tree_Left), W_1->Properties)) {
  213.       k = EvalC3_ToBit0(t, (LONGINT)j);
  214.       IO_WriteS(Tree_f, (STRING)"IFNOTIN (", 9L);
  215.       Tree_WN((LONGINT)(k % TreeC1_BSS));
  216.       IO_WriteS(Tree_f, (STRING)", yyt->yyHead.yyIsComp", 22L);
  217.       Tree_WN((LONGINT)(k / TreeC1_BSS));
  218.       IO_WriteS(Tree_f, (STRING)") ", 2L);
  219.       if (Sets_IsElement(ORD('Z'), &Tree_Options) && IN(Tree_Trace, t->U_1.V_5.Class.Properties)) {
  220.         IO_WriteS(Tree_f, (STRING)"yyVisitParent (yyt); ", 21L);
  221.         IO_WriteS(Tree_f, (STRING)"yyI [yyt->yyHead.yyOffset + ", 28L);
  222.         Tree_WN((LONGINT)k);
  223.         IO_WriteS(Tree_f, (STRING)"](yyt->yyHead.yyParent); /* ", 28L);
  224.         Tree_WI(W_1->Attribute->U_1.V_9.Child.Name);
  225.         IO_WriteS(Tree_f, (STRING)" */ ", 4L);
  226.         IO_WriteS(Tree_f, (STRING)"yyWriteVisit (yyt->yyHead.yyParent, \"?\"); }", 43L);
  227.         IO_WriteNl(Tree_f);
  228.       } else {
  229.         IO_WriteS(Tree_f, (STRING)"yyI [yyt->yyHead.yyOffset + ", 28L);
  230.         Tree_WN((LONGINT)k);
  231.         IO_WriteS(Tree_f, (STRING)"](yyt->yyHead.yyParent); /* ", 28L);
  232.         Tree_WI(W_1->Attribute->U_1.V_9.Child.Name);
  233.         IO_WriteS(Tree_f, (STRING)" */ }", 5L);
  234.         IO_WriteNl(Tree_f);
  235.       }
  236.     } else if (SET_IS_SUBSET1(SET_ELEM(Tree_Inherited) | SET_ELEM(Tree_Right), W_1->Properties)) {
  237.       k = ToBit1(W_1->Selector, (LONGINT)(j - t->U_1.V_5.Class.AttrCount - W_1->Selector->U_1.V_9.Child.InstOffset));
  238.       IO_WriteS(Tree_f, (STRING)"IFNOTIN (", 9L);
  239.       Tree_WN((LONGINT)(k % TreeC1_BSS));
  240.       IO_WriteS(Tree_f, (STRING)", yyt->", 7L);
  241.       Tree_WI(EvalC_Class->U_1.V_5.Class.Name);
  242.       IO_WriteS(Tree_f, (STRING)".", 1L);
  243.       Tree_WI(W_1->Selector->U_1.V_9.Child.Name);
  244.       IO_WriteS(Tree_f, (STRING)"->yyHead.yyIsComp", 17L);
  245.       Tree_WN((LONGINT)(k / TreeC1_BSS));
  246.       IO_WriteS(Tree_f, (STRING)") ", 2L);
  247.       k = ToBit2(t, W_1->Selector, j);
  248.       IO_WriteS(Tree_f, (STRING)"yyI", 3L);
  249.       Tree_WN((LONGINT)k);
  250.       IO_WriteS(Tree_f, (STRING)" (yyt); /* ", 11L);
  251.       Tree_WI(W_1->Selector->U_1.V_9.Child.Name);
  252.       IO_WriteS(Tree_f, (STRING)":", 1L);
  253.       Tree_WI(W_1->Attribute->U_1.V_9.Child.Name);
  254.       IO_WriteS(Tree_f, (STRING)" */ }", 5L);
  255.       IO_WriteNl(Tree_f);
  256.     } else if (SET_IS_SUBSET1(SET_ELEM(Tree_Synthesized) | SET_ELEM(Tree_Right), W_1->Properties)) {
  257.       k = ToBit1(W_1->Selector, (LONGINT)(j - t->U_1.V_5.Class.AttrCount - W_1->Selector->U_1.V_9.Child.InstOffset));
  258.       IO_WriteS(Tree_f, (STRING)"IFNOTIN (", 9L);
  259.       Tree_WN((LONGINT)(k % TreeC1_BSS));
  260.       IO_WriteS(Tree_f, (STRING)", yyt->", 7L);
  261.       Tree_WI(EvalC_Class->U_1.V_5.Class.Name);
  262.       IO_WriteS(Tree_f, (STRING)".", 1L);
  263.       Tree_WI(W_1->Selector->U_1.V_9.Child.Name);
  264.       IO_WriteS(Tree_f, (STRING)"->yyHead.yyIsComp", 17L);
  265.       Tree_WN((LONGINT)(k / TreeC1_BSS));
  266.       IO_WriteS(Tree_f, (STRING)") ", 2L);
  267.       if (Sets_IsElement(ORD('Z'), &Tree_Options) && IN(Tree_Trace, t->U_1.V_5.Class.Properties)) {
  268.         IO_WriteS(Tree_f, (STRING)"yyWriteVisit (yyt, \"", 20L);
  269.         Tree_WI(W_1->Selector->U_1.V_9.Child.Name);
  270.         IO_WriteS(Tree_f, (STRING)"\"); ", 4L);
  271.         IO_WriteS(Tree_f, (STRING)"yyS", 3L);
  272.         Tree_WN((LONGINT)k);
  273.         IO_WriteS(Tree_f, (STRING)" (yyt->", 7L);
  274.         Tree_WI(EvalC_Class->U_1.V_5.Class.Name);
  275.         IO_WriteS(Tree_f, (STRING)".", 1L);
  276.         Tree_WI(W_1->Selector->U_1.V_9.Child.Name);
  277.         IO_WriteS(Tree_f, (STRING)"); /* ", 6L);
  278.         Tree_WI(W_1->Selector->U_1.V_9.Child.Name);
  279.         IO_WriteS(Tree_f, (STRING)":", 1L);
  280.         Tree_WI(W_1->Attribute->U_1.V_9.Child.Name);
  281.         IO_WriteS(Tree_f, (STRING)" */ ", 4L);
  282.         IO_WriteS(Tree_f, (STRING)"yyVisitParent (yyt->", 20L);
  283.         Tree_WI(EvalC_Class->U_1.V_5.Class.Name);
  284.         IO_WriteS(Tree_f, (STRING)".", 1L);
  285.         Tree_WI(W_1->Selector->U_1.V_9.Child.Name);
  286.         IO_WriteS(Tree_f, (STRING)"); }", 4L);
  287.         IO_WriteNl(Tree_f);
  288.       } else {
  289.         IO_WriteS(Tree_f, (STRING)"yyS", 3L);
  290.         Tree_WN((LONGINT)k);
  291.         IO_WriteS(Tree_f, (STRING)" (yyt->", 7L);
  292.         Tree_WI(EvalC_Class->U_1.V_5.Class.Name);
  293.         IO_WriteS(Tree_f, (STRING)".", 1L);
  294.         Tree_WI(W_1->Selector->U_1.V_9.Child.Name);
  295.         IO_WriteS(Tree_f, (STRING)"); /* ", 6L);
  296.         Tree_WI(W_1->Selector->U_1.V_9.Child.Name);
  297.         IO_WriteS(Tree_f, (STRING)":", 1L);
  298.         Tree_WI(W_1->Attribute->U_1.V_9.Child.Name);
  299.         IO_WriteS(Tree_f, (STRING)" */ }", 5L);
  300.         IO_WriteNl(Tree_f);
  301.       }
  302.     }
  303.   }
  304. }
  305.  
  306. static void GenEvalAttr
  307. # ifdef __STDC__
  308. (Tree_tTree t, INTEGER i)
  309. # else
  310. (t, i)
  311. Tree_tTree t;
  312. INTEGER i;
  313. # endif
  314. {
  315.   EvalC_Class = t;
  316.   {
  317.     register Tree_tInstance *W_2 = &t->U_1.V_5.Class.Instance->A[i - 1];
  318.  
  319.     if (Sets_IsElement(ORD('X'), &Tree_Options) && IN(Tree_Trace, t->U_1.V_5.Class.Properties)) {
  320.       IO_WriteS(Tree_f, (STRING)"yyWriteEval (yyt, \"", 19L);
  321.       Tree_WI(W_2->Attribute->U_1.V_9.Child.Name);
  322.       IO_WriteS(Tree_f, (STRING)"\");", 3L);
  323.       IO_WriteNl(Tree_f);
  324.       if (W_2->Action != ADR(W_2->Action) && !IN(Tree_Virtual, W_2->Properties)) {
  325.         EvalC_GenEvaluator(W_2->Action);
  326.         IO_WriteNl(Tree_f);
  327.         if (IN(Tree_Test, W_2->Properties)) {
  328.           IO_WriteS(Tree_f, (STRING)"writebool (yyb) yyWriteNl ();", 29L);
  329.           IO_WriteNl(Tree_f);
  330.         } else if (W_2->Attribute->U_1.V_1.Kind == Tree_Child || W_2->Attribute->U_1.V_10.Attribute.Type == Tree_itTree) {
  331.           IO_WriteS(Tree_f, (STRING)"write", 5L);
  332.           Tree_WI(Tree_itTree);
  333.           IO_WriteS(Tree_f, (STRING)" (yyt->", 7L);
  334.           Tree_WI(t->U_1.V_5.Class.Name);
  335.           IO_WriteS(Tree_f, (STRING)".", 1L);
  336.           Tree_WI(W_2->Attribute->U_1.V_9.Child.Name);
  337.           IO_WriteS(Tree_f, (STRING)")", 1L);
  338.           IO_WriteNl(Tree_f);
  339.         } else {
  340.           IO_WriteS(Tree_f, (STRING)"write", 5L);
  341.           Tree_WI(W_2->Attribute->U_1.V_9.Child.Type);
  342.           IO_WriteS(Tree_f, (STRING)" (yyt->", 7L);
  343.           Tree_WI(t->U_1.V_5.Class.Name);
  344.           IO_WriteS(Tree_f, (STRING)".", 1L);
  345.           Tree_WI(W_2->Attribute->U_1.V_9.Child.Name);
  346.           IO_WriteS(Tree_f, (STRING)") yyWriteNl ();", 15L);
  347.           IO_WriteNl(Tree_f);
  348.         }
  349.       } else {
  350.         IO_WriteS(Tree_f, (STRING)"yyWriteNl ();", 13L);
  351.         IO_WriteNl(Tree_f);
  352.       }
  353.     } else if (Sets_IsElement(ORD('Y'), &Tree_Options) && IN(Tree_Trace, t->U_1.V_5.Class.Properties)) {
  354.       IO_WriteS(Tree_f, (STRING)"yyWriteEval (yyt, \"", 19L);
  355.       Tree_WI(W_2->Attribute->U_1.V_9.Child.Name);
  356.       IO_WriteS(Tree_f, (STRING)"\");", 3L);
  357.       IO_WriteNl(Tree_f);
  358.       if (W_2->Action != ADR(W_2->Action) && !IN(Tree_Virtual, W_2->Properties)) {
  359.         EvalC_GenEvaluator(W_2->Action);
  360.       }
  361.     } else {
  362.       if (W_2->Action != ADR(W_2->Action) && !IN(Tree_Virtual, W_2->Properties)) {
  363.         EvalC_GenEvaluator(W_2->Action);
  364.       }
  365.     }
  366.   }
  367. }
  368.  
  369. static void yyAbort
  370. # ifdef __STDC__
  371. (CHAR yyFunction[], LONGCARD O_1)
  372. # else
  373. (yyFunction, O_1)
  374. CHAR yyFunction[];
  375. LONGCARD O_1;
  376. # endif
  377. {
  378.   OPEN_ARRAY_LOCALS
  379.  
  380.   ALLOC_OPEN_ARRAYS(O_1 * sizeof(CHAR), 1)
  381.   COPY_OPEN_ARRAY(yyFunction, O_1, CHAR)
  382.   IO_WriteS((System_tFile)IO_StdError, (STRING)"Error: module EvalC3, routine ", 30L);
  383.   IO_WriteS((System_tFile)IO_StdError, yyFunction, O_1);
  384.   IO_WriteS((System_tFile)IO_StdError, (STRING)" failed", 7L);
  385.   IO_WriteNl((System_tFile)IO_StdError);
  386.   (*EvalC3_Exit)();
  387.   FREE_OPEN_ARRAYS
  388. }
  389.  
  390. static BOOLEAN yyIsEqual
  391. # ifdef __STDC__
  392. (BYTE yya[], LONGCARD O_3, BYTE yyb[], LONGCARD O_2)
  393. # else
  394. (yya, O_3, yyb, O_2)
  395. BYTE yya[];
  396. LONGCARD O_3;
  397. BYTE yyb[];
  398. LONGCARD O_2;
  399. # endif
  400. {
  401.   INTEGER yyi;
  402.   OPEN_ARRAY_LOCALS
  403.  
  404.   ALLOC_OPEN_ARRAYS(O_2 * sizeof(WORD) + O_3 * sizeof(WORD), 2)
  405.   COPY_OPEN_ARRAY(yyb, O_2, WORD)
  406.   COPY_OPEN_ARRAY(yya, O_3, WORD)
  407.   {
  408.     LONGINT B_1 = 0, B_2 = (INTEGER)(O_3 - 1);
  409.  
  410.     if (B_1 <= B_2)
  411.       for (yyi = B_1;; yyi += 1) {
  412.         if (yya[yyi] != yyb[yyi]) {
  413.           FREE_OPEN_ARRAYS
  414.           return FALSE;
  415.         }
  416.         if (yyi >= B_2) break;
  417.       }
  418.   }
  419.   FREE_OPEN_ARRAYS
  420.   return TRUE;
  421. }
  422.  
  423. void EvalC3_EvalImplC
  424. # ifdef __STDC__
  425. (Tree_tTree t)
  426. # else
  427. (t)
  428. Tree_tTree t;
  429. # endif
  430. {
  431.   struct S_4 yyTempo;
  432.  
  433.   if (t == Tree_NoTree) {
  434.     return;
  435.   }
  436.   if (t->U_1.V_1.Kind == Tree_Ag) {
  437.     {
  438.       register Tree_yAg *W_3 = &t->U_1.V_26.Ag;
  439.  
  440.       MaxBit = 0;
  441.       MaxInstCount = 0;
  442.       Tree_ForallClasses(W_3->Classes, (Tree_ProcOfT)CompBitInfo);
  443.       Sets_MakeSet(&InhIndices, (LONGCARD)MaxInstCount);
  444.       InhIndexSize = MaxInstCount;
  445.       DynArray_MakeArray((ADDRESS *)&InhIndexCount, &InhIndexSize, (LONGINT)sizeof(SHORTCARD));
  446.       {
  447.         SHORTCARD B_3 = 1, B_4 = MaxInstCount;
  448.  
  449.         if (B_3 <= B_4)
  450.           for (i = B_3;; i += 1) {
  451.             InhIndexCount->A[i - 1] = 0;
  452.             if (i >= B_4) break;
  453.           }
  454.       }
  455.       Tree_ForallClasses(W_3->Classes, (Tree_ProcOfT)CompInhIndices);
  456.       IO_WriteS(Tree_f, (STRING)"# define IFNOTIN(b, s) if (! (s & 1 << b)) {", 44L);
  457.       IO_WriteNl(Tree_f);
  458.       IO_WriteS(Tree_f, (STRING)"# define INCL(s, b) s |= 1 << b", 31L);
  459.       IO_WriteNl(Tree_f);
  460.       IO_WriteS(Tree_f, (STRING)"# define REMOTE_SYN(i, b, c, n, t, a) (n->yyHead.i & 1 << b ? (void) 0 : c (n), n->t.a)", 87L);
  461.       IO_WriteNl(Tree_f);
  462.       IO_WriteS(Tree_f, (STRING)"# define REMOTE_INH(i, b, k, n, t, a) (n->yyHead.i & 1 << b ? (void) 0 : yyI [n->yyHead.yyOffset + k](n->yyHead.yyParent), n->t.a)", 130L);
  463.       IO_WriteNl(Tree_f);
  464.       EvalC_EvalImplHead(t);
  465.       IO_WriteNl(Tree_f);
  466.       IO_WriteS(Tree_f, (STRING)"static void yyE ARGS((register ", 31L);
  467.       Tree_WI(Tree_itTree);
  468.       IO_WriteS(Tree_f, (STRING)" yyt));", 7L);
  469.       IO_WriteNl(Tree_f);
  470.       {
  471.         SHORTCARD B_5 = 1, B_6 = MaxBit - 1;
  472.  
  473.         if (B_5 <= B_6)
  474.           for (i = B_5;; i += 1) {
  475.             IO_WriteS(Tree_f, (STRING)"static void yyS", 15L);
  476.             Tree_WN((LONGINT)i);
  477.             IO_WriteS(Tree_f, (STRING)" ARGS((register ", 16L);
  478.             Tree_WI(Tree_itTree);
  479.             IO_WriteS(Tree_f, (STRING)" yyt));", 7L);
  480.             IO_WriteNl(Tree_f);
  481.             if (i >= B_6) break;
  482.           }
  483.       }
  484.       {
  485.         SHORTCARD B_7 = Sets_Minimum(&InhIndices), B_8 = Sets_Maximum(&InhIndices);
  486.  
  487.         if (B_7 <= B_8)
  488.           for (i = B_7;; i += 1) {
  489.             if (Sets_IsElement((LONGCARD)i, &InhIndices)) {
  490.               IO_WriteS(Tree_f, (STRING)"static void yyI", 15L);
  491.               Tree_WN((LONGINT)i);
  492.               IO_WriteS(Tree_f, (STRING)" ARGS((register ", 16L);
  493.               Tree_WI(Tree_itTree);
  494.               IO_WriteS(Tree_f, (STRING)" yyt));", 7L);
  495.               IO_WriteNl(Tree_f);
  496.             }
  497.             if (i >= B_8) break;
  498.           }
  499.       }
  500.       IO_WriteNl(Tree_f);
  501.       IO_WriteS(Tree_f, (STRING)"static ", 7L);
  502.       Tree_WI(Tree_iMain);
  503.       IO_WriteS(Tree_f, (STRING)"_tProcTree yyI [", 16L);
  504.       Tree_WN((LONGINT)(Sets_Maximum(&InhIndices) + 1));
  505.       IO_WriteS(Tree_f, (STRING)"] = { 0,", 8L);
  506.       IO_WriteNl(Tree_f);
  507.       {
  508.         SHORTCARD B_9 = 1, B_10 = Sets_Maximum(&InhIndices);
  509.  
  510.         if (B_9 <= B_10)
  511.           for (i = B_9;; i += 1) {
  512.             if (Sets_IsElement((LONGCARD)i, &InhIndices)) {
  513.               IO_WriteS(Tree_f, (STRING)" yyI", 4L);
  514.               Tree_WN((LONGINT)i);
  515.               IO_WriteS(Tree_f, (STRING)",", 1L);
  516.               IO_WriteNl(Tree_f);
  517.             } else {
  518.               IO_WriteS(Tree_f, (STRING)" 0,", 3L);
  519.               IO_WriteNl(Tree_f);
  520.             }
  521.             if (i >= B_10) break;
  522.           }
  523.       }
  524.       IO_WriteS(Tree_f, (STRING)"};", 2L);
  525.       IO_WriteNl(Tree_f);
  526.       IO_WriteNl(Tree_f);
  527.       IO_WriteS(Tree_f, (STRING)"static void yyAbort", 19L);
  528.       IO_WriteNl(Tree_f);
  529.       IO_WriteS(Tree_f, (STRING)"# if defined __STDC__ | defined __cplusplus", 43L);
  530.       IO_WriteNl(Tree_f);
  531.       IO_WriteS(Tree_f, (STRING)" (", 2L);
  532.       Tree_WI(Tree_itTree);
  533.       IO_WriteS(Tree_f, (STRING)" yyt)", 5L);
  534.       IO_WriteNl(Tree_f);
  535.       IO_WriteS(Tree_f, (STRING)"# else", 6L);
  536.       IO_WriteNl(Tree_f);
  537.       IO_WriteS(Tree_f, (STRING)" (yyt) ", 7L);
  538.       Tree_WI(Tree_itTree);
  539.       IO_WriteS(Tree_f, (STRING)" yyt;", 5L);
  540.       IO_WriteNl(Tree_f);
  541.       IO_WriteS(Tree_f, (STRING)"# endif", 7L);
  542.       IO_WriteNl(Tree_f);
  543.       IO_WriteS(Tree_f, (STRING)"{", 1L);
  544.       IO_WriteNl(Tree_f);
  545.       IO_WriteS(Tree_f, (STRING)" (void) fprintf (stderr, \"Error: module ", 40L);
  546.       Tree_WI(W_3->EvalName);
  547.       IO_WriteS(Tree_f, (STRING)", cyclic dependencies\\n\");", 26L);
  548.       IO_WriteNl(Tree_f);
  549.       IO_WriteS(Tree_f, (STRING)" ", 1L);
  550.       Tree_WI(Tree_iMain);
  551.       IO_WriteS(Tree_f, (STRING)"_Exit ();", 9L);
  552.       IO_WriteNl(Tree_f);
  553.       IO_WriteS(Tree_f, (STRING)"}", 1L);
  554.       IO_WriteNl(Tree_f);
  555.       IO_WriteNl(Tree_f);
  556.       IO_WriteS(Tree_f, (STRING)"void ", 5L);
  557.       Tree_WI(W_3->EvalName);
  558.       IO_WriteNl(Tree_f);
  559.       IO_WriteS(Tree_f, (STRING)"# if defined __STDC__ | defined __cplusplus", 43L);
  560.       IO_WriteNl(Tree_f);
  561.       IO_WriteS(Tree_f, (STRING)" (", 2L);
  562.       Tree_WI(Tree_itTree);
  563.       IO_WriteS(Tree_f, (STRING)" yyt)", 5L);
  564.       IO_WriteNl(Tree_f);
  565.       IO_WriteS(Tree_f, (STRING)"# else", 6L);
  566.       IO_WriteNl(Tree_f);
  567.       IO_WriteS(Tree_f, (STRING)" (yyt) ", 7L);
  568.       Tree_WI(Tree_itTree);
  569.       IO_WriteS(Tree_f, (STRING)" yyt;", 5L);
  570.       IO_WriteNl(Tree_f);
  571.       IO_WriteS(Tree_f, (STRING)"# endif", 7L);
  572.       IO_WriteNl(Tree_f);
  573.       if (!Sets_IsElement(ORD('9'), &Tree_Options)) {
  574.         IO_WriteS(Tree_f, (STRING)"{ Init", 6L);
  575.         Tree_WI(Tree_iModule);
  576.         IO_WriteS(Tree_f, (STRING)" (yyt); yyE (yyt); }", 20L);
  577.         IO_WriteNl(Tree_f);
  578.       } else {
  579.         IO_WriteS(Tree_f, (STRING)"{", 1L);
  580.         IO_WriteNl(Tree_f);
  581.         IO_WriteS(Tree_f, (STRING)" char xxHigh;", 13L);
  582.         IO_WriteNl(Tree_f);
  583.         IO_WriteS(Tree_f, (STRING)" xxStack = 1000000000;", 22L);
  584.         IO_WriteNl(Tree_f);
  585.         IO_WriteS(Tree_f, (STRING)" Init", 5L);
  586.         Tree_WI(Tree_iModule);
  587.         IO_WriteS(Tree_f, (STRING)" (yyt); yyE (yyt);", 18L);
  588.         IO_WriteNl(Tree_f);
  589.         IO_WriteS(Tree_f, (STRING)" (void) printf (\"Stacksize %d\\n\", (int) & xxHigh - xxStack);", 60L);
  590.         IO_WriteNl(Tree_f);
  591.         IO_WriteS(Tree_f, (STRING)"}", 1L);
  592.         IO_WriteNl(Tree_f);
  593.       }
  594.       IO_WriteNl(Tree_f);
  595.       do {
  596.         IsStable = TRUE;
  597.         Tree_ForallClasses(W_3->Classes, (Tree_ProcOfT)CompOutput);
  598.       } while (!IsStable);
  599.       IO_WriteS(Tree_f, (STRING)"static void yyE", 15L);
  600.       IO_WriteNl(Tree_f);
  601.       IO_WriteS(Tree_f, (STRING)"# if defined __STDC__ | defined __cplusplus", 43L);
  602.       IO_WriteNl(Tree_f);
  603.       IO_WriteS(Tree_f, (STRING)" (register ", 11L);
  604.       Tree_WI(Tree_itTree);
  605.       IO_WriteS(Tree_f, (STRING)" yyt)", 5L);
  606.       IO_WriteNl(Tree_f);
  607.       IO_WriteS(Tree_f, (STRING)"# else", 6L);
  608.       IO_WriteNl(Tree_f);
  609.       IO_WriteS(Tree_f, (STRING)" (yyt) register ", 16L);
  610.       Tree_WI(Tree_itTree);
  611.       IO_WriteS(Tree_f, (STRING)" yyt;", 5L);
  612.       IO_WriteNl(Tree_f);
  613.       IO_WriteS(Tree_f, (STRING)"# endif", 7L);
  614.       IO_WriteNl(Tree_f);
  615.       IO_WriteS(Tree_f, (STRING)"{", 1L);
  616.       IO_WriteNl(Tree_f);
  617.       TreeC2_WriteLine(Tree_TreeRoot->U_1.V_26.Ag.EvalCodes->U_1.V_12.Codes.LocalLine);
  618.       Texts_WriteText(Tree_f, Tree_TreeRoot->U_1.V_26.Ag.EvalCodes->U_1.V_12.Codes.Local);
  619.       Node = Tree_TreeRoot->U_1.V_26.Ag.Modules;
  620.       while (Node->U_1.V_1.Kind == Tree_Module) {
  621.         TreeC2_WriteLine(Node->U_1.V_43.Module.EvalCodes->U_1.V_12.Codes.LocalLine);
  622.         Texts_WriteText(Tree_f, Node->U_1.V_43.Module.EvalCodes->U_1.V_12.Codes.Local);
  623.         Node = Node->U_1.V_43.Module.Next;
  624.       }
  625.       if (Sets_IsElement(ORD('9'), &Tree_Options)) {
  626.         IO_WriteS(Tree_f, (STRING)" char xxLow;", 12L);
  627.         IO_WriteNl(Tree_f);
  628.         IO_WriteS(Tree_f, (STRING)" xxStack = Min (xxStack, (int) & xxLow);", 40L);
  629.         IO_WriteNl(Tree_f);
  630.       }
  631.       IO_WriteS(Tree_f, (STRING)" for (;;) {", 11L);
  632.       IO_WriteNl(Tree_f);
  633.       IO_WriteS(Tree_f, (STRING)"  if (yyt == ", 13L);
  634.       Tree_WI(Tree_iNoTree);
  635.       IO_WriteS(Tree_f, (STRING)" || yyt->yyHead.yyIsComp0 & 1) return;", 38L);
  636.       IO_WriteNl(Tree_f);
  637.       IO_WriteS(Tree_f, (STRING)"  yyt->yyHead.yyIsComp0 |= 1;", 29L);
  638.       IO_WriteNl(Tree_f);
  639.       IO_WriteS(Tree_f, (STRING)"  switch (yyt->Kind) {", 22L);
  640.       IO_WriteNl(Tree_f);
  641.       Tree_ForallClasses(W_3->Classes, (Tree_ProcOfT)GenE);
  642.       IO_WriteS(Tree_f, (STRING)"  default: return;", 18L);
  643.       IO_WriteNl(Tree_f);
  644.       IO_WriteS(Tree_f, (STRING)"  }", 3L);
  645.       IO_WriteNl(Tree_f);
  646.       IO_WriteS(Tree_f, (STRING)" }", 2L);
  647.       IO_WriteNl(Tree_f);
  648.       IO_WriteS(Tree_f, (STRING)"}", 1L);
  649.       IO_WriteNl(Tree_f);
  650.       IO_WriteNl(Tree_f);
  651.       {
  652.         SHORTCARD B_11 = 2, B_12 = MaxBit;
  653.  
  654.         if (B_11 <= B_12)
  655.           for (i = B_11;; i += 1) {
  656.             n = 0;
  657.             Tree_ForallClasses(W_3->Classes, (Tree_ProcOfT)CountSynAttr);
  658.             if (n > 0) {
  659.               IO_WriteS(Tree_f, (STRING)"static void yyS", 15L);
  660.               Tree_WN((LONGINT)(i - 1));
  661.               IO_WriteNl(Tree_f);
  662.               IO_WriteS(Tree_f, (STRING)"# if defined __STDC__ | defined __cplusplus", 43L);
  663.               IO_WriteNl(Tree_f);
  664.               IO_WriteS(Tree_f, (STRING)" (register ", 11L);
  665.               Tree_WI(Tree_itTree);
  666.               IO_WriteS(Tree_f, (STRING)" yyt)", 5L);
  667.               IO_WriteNl(Tree_f);
  668.               IO_WriteS(Tree_f, (STRING)"# else", 6L);
  669.               IO_WriteNl(Tree_f);
  670.               IO_WriteS(Tree_f, (STRING)" (yyt) register ", 16L);
  671.               Tree_WI(Tree_itTree);
  672.               IO_WriteS(Tree_f, (STRING)" yyt;", 5L);
  673.               IO_WriteNl(Tree_f);
  674.               IO_WriteS(Tree_f, (STRING)"# endif", 7L);
  675.               IO_WriteNl(Tree_f);
  676.               IO_WriteS(Tree_f, (STRING)"{", 1L);
  677.               IO_WriteNl(Tree_f);
  678.               TreeC2_WriteLine(Tree_TreeRoot->U_1.V_26.Ag.EvalCodes->U_1.V_12.Codes.LocalLine);
  679.               Texts_WriteText(Tree_f, Tree_TreeRoot->U_1.V_26.Ag.EvalCodes->U_1.V_12.Codes.Local);
  680.               Node = Tree_TreeRoot->U_1.V_26.Ag.Modules;
  681.               while (Node->U_1.V_1.Kind == Tree_Module) {
  682.                 TreeC2_WriteLine(Node->U_1.V_43.Module.EvalCodes->U_1.V_12.Codes.LocalLine);
  683.                 Texts_WriteText(Tree_f, Node->U_1.V_43.Module.EvalCodes->U_1.V_12.Codes.Local);
  684.                 Node = Node->U_1.V_43.Module.Next;
  685.               }
  686.               if (Sets_IsElement(ORD('9'), &Tree_Options)) {
  687.                 IO_WriteS(Tree_f, (STRING)" char xxLow;", 12L);
  688.                 IO_WriteNl(Tree_f);
  689.                 IO_WriteS(Tree_f, (STRING)" xxStack = Min (xxStack, (int) & xxLow);", 40L);
  690.                 IO_WriteNl(Tree_f);
  691.               }
  692.               if (Sets_IsElement(ORD('5'), &Tree_Options)) {
  693.                 IO_WriteS(Tree_f, (STRING)" IFNOTIN (", 10L);
  694.                 Tree_WN((LONGINT)((i - 1) % TreeC1_BSS));
  695.                 IO_WriteS(Tree_f, (STRING)", yyt->yyHead.yyIsDone", 22L);
  696.                 Tree_WN((LONGINT)((i - 1) / TreeC1_BSS));
  697.                 IO_WriteS(Tree_f, (STRING)") INCL (yyt->yyHead.yyIsDone", 28L);
  698.                 Tree_WN((LONGINT)((i - 1) / TreeC1_BSS));
  699.                 IO_WriteS(Tree_f, (STRING)", ", 2L);
  700.                 Tree_WN((LONGINT)((i - 1) % TreeC1_BSS));
  701.                 IO_WriteS(Tree_f, (STRING)"); } else yyAbort (yyt);", 24L);
  702.                 IO_WriteNl(Tree_f);
  703.               }
  704.               if (n > 1) {
  705.                 IO_WriteS(Tree_f, (STRING)" switch (yyt->Kind) {", 21L);
  706.                 IO_WriteNl(Tree_f);
  707.                 Tree_ForallClasses(W_3->Classes, (Tree_ProcOfT)GenS);
  708.                 IO_WriteS(Tree_f, (STRING)" }", 2L);
  709.                 IO_WriteNl(Tree_f);
  710.               } else {
  711.                 Tree_ForallClasses(W_3->Classes, (Tree_ProcOfT)GenS);
  712.               }
  713.               IO_WriteS(Tree_f, (STRING)" INCL (yyt->yyHead.yyIsComp", 27L);
  714.               Tree_WN((LONGINT)((i - 1) / TreeC1_BSS));
  715.               IO_WriteS(Tree_f, (STRING)", ", 2L);
  716.               Tree_WN((LONGINT)((i - 1) % TreeC1_BSS));
  717.               IO_WriteS(Tree_f, (STRING)");", 2L);
  718.               IO_WriteNl(Tree_f);
  719.               IO_WriteS(Tree_f, (STRING)"}", 1L);
  720.               IO_WriteNl(Tree_f);
  721.               IO_WriteNl(Tree_f);
  722.             }
  723.             if (i >= B_12) break;
  724.           }
  725.       }
  726.       {
  727.         SHORTCARD B_13 = Sets_Minimum(&InhIndices), B_14 = Sets_Maximum(&InhIndices);
  728.  
  729.         if (B_13 <= B_14)
  730.           for (i = B_13;; i += 1) {
  731.             if (Sets_IsElement((LONGCARD)i, &InhIndices)) {
  732.               IO_WriteS(Tree_f, (STRING)"static void yyI", 15L);
  733.               Tree_WN((LONGINT)i);
  734.               IO_WriteNl(Tree_f);
  735.               IO_WriteS(Tree_f, (STRING)"# if defined __STDC__ | defined __cplusplus", 43L);
  736.               IO_WriteNl(Tree_f);
  737.               IO_WriteS(Tree_f, (STRING)" (register ", 11L);
  738.               Tree_WI(Tree_itTree);
  739.               IO_WriteS(Tree_f, (STRING)" yyt)", 5L);
  740.               IO_WriteNl(Tree_f);
  741.               IO_WriteS(Tree_f, (STRING)"# else", 6L);
  742.               IO_WriteNl(Tree_f);
  743.               IO_WriteS(Tree_f, (STRING)" (yyt) register ", 16L);
  744.               Tree_WI(Tree_itTree);
  745.               IO_WriteS(Tree_f, (STRING)" yyt;", 5L);
  746.               IO_WriteNl(Tree_f);
  747.               IO_WriteS(Tree_f, (STRING)"# endif", 7L);
  748.               IO_WriteNl(Tree_f);
  749.               IO_WriteS(Tree_f, (STRING)"{", 1L);
  750.               IO_WriteNl(Tree_f);
  751.               TreeC2_WriteLine(Tree_TreeRoot->U_1.V_26.Ag.EvalCodes->U_1.V_12.Codes.LocalLine);
  752.               Texts_WriteText(Tree_f, Tree_TreeRoot->U_1.V_26.Ag.EvalCodes->U_1.V_12.Codes.Local);
  753.               Node = Tree_TreeRoot->U_1.V_26.Ag.Modules;
  754.               while (Node->U_1.V_1.Kind == Tree_Module) {
  755.                 TreeC2_WriteLine(Node->U_1.V_43.Module.EvalCodes->U_1.V_12.Codes.LocalLine);
  756.                 Texts_WriteText(Tree_f, Node->U_1.V_43.Module.EvalCodes->U_1.V_12.Codes.Local);
  757.                 Node = Node->U_1.V_43.Module.Next;
  758.               }
  759.               if (Sets_IsElement(ORD('9'), &Tree_Options)) {
  760.                 IO_WriteS(Tree_f, (STRING)" char xxLow;", 12L);
  761.                 IO_WriteNl(Tree_f);
  762.                 IO_WriteS(Tree_f, (STRING)" xxStack = Min (xxStack, (int) & xxLow);", 40L);
  763.                 IO_WriteNl(Tree_f);
  764.               }
  765.               Check = 0;
  766.               if (InhIndexCount->A[i - 1] > 1) {
  767.                 IO_WriteS(Tree_f, (STRING)" switch (yyt->Kind) {", 21L);
  768.                 IO_WriteNl(Tree_f);
  769.                 Tree_ForallClasses(W_3->Classes, (Tree_ProcOfT)EvalC3_EvalImplC);
  770.                 IO_WriteS(Tree_f, (STRING)" }", 2L);
  771.                 IO_WriteNl(Tree_f);
  772.               } else {
  773.                 Tree_ForallClasses(W_3->Classes, (Tree_ProcOfT)EvalC3_EvalImplC);
  774.               }
  775.               if (Check != InhIndexCount->A[i - 1]) {
  776.                 Errors_MessageI((STRING)"internal error in yyI", 21L, (LONGCARD)Errors_Error, Positions_NoPosition, (LONGCARD)Errors_Short, ADR(i));
  777.               }
  778.               IO_WriteS(Tree_f, (STRING)"}", 1L);
  779.               IO_WriteNl(Tree_f);
  780.               IO_WriteNl(Tree_f);
  781.             }
  782.             if (i >= B_14) break;
  783.           }
  784.       }
  785.       IO_WriteS(Tree_f, (STRING)"void Begin", 10L);
  786.       Tree_WI(W_3->EvalName);
  787.       IO_WriteS(Tree_f, (STRING)" ()", 3L);
  788.       IO_WriteNl(Tree_f);
  789.       IO_WriteS(Tree_f, (STRING)"{", 1L);
  790.       IO_WriteNl(Tree_f);
  791.       TreeC2_WriteLine(W_3->EvalCodes->U_1.V_12.Codes.BeginLine);
  792.       Texts_WriteText(Tree_f, W_3->EvalCodes->U_1.V_12.Codes.Begin);
  793.       Node = W_3->Modules;
  794.       while (Node->U_1.V_1.Kind == Tree_Module) {
  795.         TreeC2_WriteLine(Node->U_1.V_43.Module.EvalCodes->U_1.V_12.Codes.BeginLine);
  796.         Texts_WriteText(Tree_f, Node->U_1.V_43.Module.EvalCodes->U_1.V_12.Codes.Begin);
  797.         Node = Node->U_1.V_43.Module.Next;
  798.       }
  799.       IO_WriteS(Tree_f, (STRING)"}", 1L);
  800.       IO_WriteNl(Tree_f);
  801.       IO_WriteNl(Tree_f);
  802.       IO_WriteS(Tree_f, (STRING)"void Close", 10L);
  803.       Tree_WI(W_3->EvalName);
  804.       IO_WriteS(Tree_f, (STRING)" ()", 3L);
  805.       IO_WriteNl(Tree_f);
  806.       IO_WriteS(Tree_f, (STRING)"{", 1L);
  807.       IO_WriteNl(Tree_f);
  808.       TreeC2_WriteLine(W_3->EvalCodes->U_1.V_12.Codes.CloseLine);
  809.       Texts_WriteText(Tree_f, W_3->EvalCodes->U_1.V_12.Codes.Close);
  810.       Node = W_3->Modules;
  811.       while (Node->U_1.V_1.Kind == Tree_Module) {
  812.         TreeC2_WriteLine(Node->U_1.V_43.Module.EvalCodes->U_1.V_12.Codes.CloseLine);
  813.         Texts_WriteText(Tree_f, Node->U_1.V_43.Module.EvalCodes->U_1.V_12.Codes.Close);
  814.         Node = Node->U_1.V_43.Module.Next;
  815.       }
  816.       IO_WriteS(Tree_f, (STRING)"}", 1L);
  817.       IO_WriteNl(Tree_f);
  818.       return;
  819.     }
  820.   }
  821.   if (t->U_1.V_1.Kind == Tree_Class) {
  822.     {
  823.       register struct S_5 *W_4 = &yyTempo.U_1.V_1.yyR2;
  824.  
  825.       for (;;) {
  826.         {
  827.           register Tree_yClass *W_5 = &t->U_1.V_5.Class;
  828.  
  829.           if (!((Tree_NoCodeClass & W_5->Properties) == 0X0L)) {
  830.             goto EXIT_1;
  831.           }
  832.           if (!(i <= W_5->InstCount)) {
  833.             goto EXIT_1;
  834.           }
  835.           W_4->a = ToAttr(t, (LONGINT)i);
  836.           if (W_4->a == 0) {
  837.             return;
  838.           }
  839.           {
  840.             register Tree_tInstance *W_6 = &W_5->Instance->A[W_4->a - 1];
  841.  
  842.             if (SET_IS_SUBSET1(SET_ELEM(Tree_Inherited) | SET_ELEM(Tree_Right), W_6->Properties)) {
  843.               EvalC_Class = t;
  844.               if (InhIndexCount->A[i - 1] > 1) {
  845.                 IO_WriteS(Tree_f, (STRING)"  case k", 8L);
  846.                 Tree_WI(W_5->Name);
  847.                 IO_WriteS(Tree_f, (STRING)":", 1L);
  848.                 IO_WriteNl(Tree_f);
  849.               }
  850.               INC(Check);
  851.               k = ToBit1(W_6->Selector, (LONGINT)(W_4->a - W_5->AttrCount - W_6->Selector->U_1.V_9.Child.InstOffset));
  852.               if (Sets_IsElement(ORD('5'), &Tree_Options)) {
  853.                 IO_WriteS(Tree_f, (STRING)" IFNOTIN (", 10L);
  854.                 Tree_WN((LONGINT)(k % TreeC1_BSS));
  855.                 IO_WriteS(Tree_f, (STRING)", yyt->", 7L);
  856.                 Tree_WI(EvalC_Class->U_1.V_5.Class.Name);
  857.                 IO_WriteS(Tree_f, (STRING)".", 1L);
  858.                 Tree_WI(W_6->Selector->U_1.V_9.Child.Name);
  859.                 IO_WriteS(Tree_f, (STRING)"->yyHead.yyIsDone", 17L);
  860.                 Tree_WN((LONGINT)(k / TreeC1_BSS));
  861.                 IO_WriteS(Tree_f, (STRING)") INCL (yyt->", 13L);
  862.                 Tree_WI(EvalC_Class->U_1.V_5.Class.Name);
  863.                 IO_WriteS(Tree_f, (STRING)".", 1L);
  864.                 Tree_WI(W_6->Selector->U_1.V_9.Child.Name);
  865.                 IO_WriteS(Tree_f, (STRING)"->yyHead.yyIsDone", 17L);
  866.                 Tree_WN((LONGINT)(k / TreeC1_BSS));
  867.                 IO_WriteS(Tree_f, (STRING)", ", 2L);
  868.                 Tree_WN((LONGINT)(k % TreeC1_BSS));
  869.                 IO_WriteS(Tree_f, (STRING)"); } else yyAbort (yyt);", 24L);
  870.                 IO_WriteNl(Tree_f);
  871.               }
  872.               {
  873.                 SHORTCARD B_15 = 1, B_16 = W_5->InstCount;
  874.  
  875.                 if (B_15 <= B_16)
  876.                   for (j = B_15;; j += 1) {
  877.                     if (Relations_IsRelated((LONGINT)W_4->a, (LONGINT)j, W_5->DP)) {
  878.                       GenCall(t, j);
  879.                     }
  880.                     if (j >= B_16) break;
  881.                   }
  882.               }
  883.               if (Sets_IsElement(ORD('X'), &Tree_Options) && IN(Tree_Trace, t->U_1.V_5.Class.Properties)) {
  884.                 IO_WriteS(Tree_f, (STRING)"yyWriteEval (yyt, \"", 19L);
  885.                 Tree_WI(W_6->Selector->U_1.V_9.Child.Name);
  886.                 IO_WriteS(Tree_f, (STRING)":", 1L);
  887.                 Tree_WI(W_6->Attribute->U_1.V_9.Child.Name);
  888.                 IO_WriteS(Tree_f, (STRING)"\");", 3L);
  889.                 IO_WriteNl(Tree_f);
  890.                 if (W_6->Action != ADR(W_6->Action) && !IN(Tree_Virtual, W_6->Properties)) {
  891.                   EvalC_GenEvaluator(W_6->Action);
  892.                   IO_WriteNl(Tree_f);
  893.                   if (W_6->Attribute->U_1.V_1.Kind == Tree_Child || W_6->Attribute->U_1.V_10.Attribute.Type == Tree_itTree) {
  894.                     IO_WriteS(Tree_f, (STRING)"write", 5L);
  895.                     Tree_WI(Tree_itTree);
  896.                     IO_WriteS(Tree_f, (STRING)" (yyt->", 7L);
  897.                     Tree_WI(W_5->Name);
  898.                     IO_WriteS(Tree_f, (STRING)".", 1L);
  899.                     Tree_WI(W_6->Selector->U_1.V_9.Child.Name);
  900.                     IO_WriteS(Tree_f, (STRING)"->", 2L);
  901.                     Tree_WI(W_6->Selector->U_1.V_9.Child.Type);
  902.                     IO_WriteS(Tree_f, (STRING)".", 1L);
  903.                     Tree_WI(W_6->Attribute->U_1.V_9.Child.Name);
  904.                     IO_WriteS(Tree_f, (STRING)")", 1L);
  905.                     IO_WriteNl(Tree_f);
  906.                   } else {
  907.                     IO_WriteS(Tree_f, (STRING)"write", 5L);
  908.                     Tree_WI(W_6->Attribute->U_1.V_9.Child.Type);
  909.                     IO_WriteS(Tree_f, (STRING)" (yyt->", 7L);
  910.                     Tree_WI(W_5->Name);
  911.                     IO_WriteS(Tree_f, (STRING)".", 1L);
  912.                     Tree_WI(W_6->Selector->U_1.V_9.Child.Name);
  913.                     IO_WriteS(Tree_f, (STRING)"->", 2L);
  914.                     Tree_WI(W_6->Selector->U_1.V_9.Child.Type);
  915.                     IO_WriteS(Tree_f, (STRING)".", 1L);
  916.                     Tree_WI(W_6->Attribute->U_1.V_9.Child.Name);
  917.                     IO_WriteS(Tree_f, (STRING)") yyWriteNl ();", 15L);
  918.                     IO_WriteNl(Tree_f);
  919.                   }
  920.                 } else {
  921.                   IO_WriteS(Tree_f, (STRING)"yyWriteNl ();", 13L);
  922.                   IO_WriteNl(Tree_f);
  923.                 }
  924.               } else if (Sets_IsElement(ORD('Y'), &Tree_Options) && IN(Tree_Trace, t->U_1.V_5.Class.Properties)) {
  925.                 IO_WriteS(Tree_f, (STRING)"yyWriteEval (yyt, \"", 19L);
  926.                 Tree_WI(W_6->Selector->U_1.V_9.Child.Name);
  927.                 IO_WriteS(Tree_f, (STRING)":", 1L);
  928.                 Tree_WI(W_6->Attribute->U_1.V_9.Child.Name);
  929.                 IO_WriteS(Tree_f, (STRING)"\");", 3L);
  930.                 IO_WriteNl(Tree_f);
  931.                 if (W_6->Action != ADR(W_6->Action) && !IN(Tree_Virtual, W_6->Properties)) {
  932.                   EvalC_GenEvaluator(W_6->Action);
  933.                 }
  934.               } else {
  935.                 if (W_6->Action != ADR(W_6->Action) && !IN(Tree_Virtual, W_6->Properties)) {
  936.                   EvalC_GenEvaluator(W_6->Action);
  937.                 }
  938.               }
  939.               if (!IN(Tree_Input, W_6->Properties) && W_6->Attribute->U_1.V_1.Kind == Tree_Child) {
  940.                 IO_WriteS(Tree_f, (STRING)"{ register ", 11L);
  941.                 Tree_WI(Tree_itTree);
  942.                 IO_WriteS(Tree_f, (STRING)" yyr = yyt->", 12L);
  943.                 Tree_WI(W_5->Name);
  944.                 IO_WriteS(Tree_f, (STRING)".", 1L);
  945.                 Tree_WI(W_6->Selector->U_1.V_9.Child.Name);
  946.                 IO_WriteS(Tree_f, (STRING)"->", 2L);
  947.                 Tree_WI(W_6->Selector->U_1.V_9.Child.Type);
  948.                 IO_WriteS(Tree_f, (STRING)".", 1L);
  949.                 Tree_WI(W_6->Attribute->U_1.V_9.Child.Name);
  950.                 IO_WriteS(Tree_f, (STRING)"; if (yyr->yyHead.yyParent == ", 30L);
  951.                 Tree_WI(Tree_iNoTree);
  952.                 IO_WriteS(Tree_f, (STRING)") { yyr->yyHead.yyOffset = ", 27L);
  953.                 Tree_WN((LONGINT)(W_6->Selector->U_1.V_9.Child.Class->U_1.V_5.Class.BitCount + W_6->Attribute->U_1.V_9.Child.BitOffset));
  954.                 IO_WriteS(Tree_f, (STRING)"; yyr->yyHead.yyParent = yyt->", 30L);
  955.                 Tree_WI(W_5->Name);
  956.                 IO_WriteS(Tree_f, (STRING)".", 1L);
  957.                 Tree_WI(W_6->Selector->U_1.V_9.Child.Name);
  958.                 IO_WriteS(Tree_f, (STRING)"; Init", 6L);
  959.                 Tree_WI(Tree_iModule);
  960.                 IO_WriteS(Tree_f, (STRING)" (yyr); } }", 11L);
  961.                 IO_WriteNl(Tree_f);
  962.               }
  963.               {
  964.                 SHORTCARD B_17 = 1, B_18 = W_5->InstCount;
  965.  
  966.                 if (B_17 <= B_18)
  967.                   for (i2 = B_17;; i2 += 1) {
  968.                     if (W_5->Instance->A[i2 - 1].Action == W_6->Action) {
  969.                       {
  970.                         register Tree_tInstance *W_7 = &W_5->Instance->A[i2 - 1];
  971.  
  972.                         if (IN(Tree_Synthesized, W_7->Properties)) {
  973.                           k = EvalC3_ToBit0(EvalC_Class, (LONGINT)i2);
  974.                           IO_WriteS(Tree_f, (STRING)"  INCL (yyt->yyHead.yyIsComp", 28L);
  975.                           Tree_WN((LONGINT)(k / TreeC1_BSS));
  976.                           IO_WriteS(Tree_f, (STRING)", ", 2L);
  977.                           Tree_WN((LONGINT)(k % TreeC1_BSS));
  978.                           IO_WriteS(Tree_f, (STRING)");", 2L);
  979.                           IO_WriteNl(Tree_f);
  980.                         } else if (IN(Tree_Inherited, W_7->Properties)) {
  981.                           k = ToBit1(W_7->Selector, (LONGINT)(i2 - W_5->AttrCount - W_7->Selector->U_1.V_9.Child.InstOffset));
  982.                           IO_WriteS(Tree_f, (STRING)"  INCL (yyt->", 13L);
  983.                           Tree_WI(EvalC_Class->U_1.V_5.Class.Name);
  984.                           IO_WriteS(Tree_f, (STRING)".", 1L);
  985.                           Tree_WI(W_7->Selector->U_1.V_9.Child.Name);
  986.                           IO_WriteS(Tree_f, (STRING)"->yyHead.yyIsComp", 17L);
  987.                           Tree_WN((LONGINT)(k / TreeC1_BSS));
  988.                           IO_WriteS(Tree_f, (STRING)", ", 2L);
  989.                           Tree_WN((LONGINT)(k % TreeC1_BSS));
  990.                           IO_WriteS(Tree_f, (STRING)");", 2L);
  991.                           IO_WriteNl(Tree_f);
  992.                         }
  993.                       }
  994.                     }
  995.                     if (i2 >= B_18) break;
  996.                   }
  997.               }
  998.               IO_WriteS(Tree_f, (STRING)" return;", 8L);
  999.               IO_WriteNl(Tree_f);
  1000.             }
  1001.           }
  1002.           return;
  1003.         }
  1004.       } EXIT_1:;
  1005.     }
  1006.   }
  1007. }
  1008.  
  1009. static void CompBitInfo
  1010. # ifdef __STDC__
  1011. (Tree_tTree t)
  1012. # else
  1013. (t)
  1014. Tree_tTree t;
  1015. # endif
  1016. {
  1017.   struct S_6 yyTempo;
  1018.  
  1019.   if (t == Tree_NoTree) {
  1020.     return;
  1021.   }
  1022.   if (t->U_1.V_1.Kind == Tree_Class) {
  1023.     {
  1024.       register Tree_yClass *W_8 = &t->U_1.V_5.Class;
  1025.  
  1026.       BitIndexSize = W_8->AttrCount;
  1027.       DynArray_MakeArray((ADDRESS *)&W_8->BitIndex, &BitIndexSize, (LONGINT)sizeof(Tree_tBitInfo));
  1028.       i = 1;
  1029.       gBitIndex = W_8->BitIndex;
  1030.       Tree_ForallAttributes(t, (Tree_ProcOfT)CompBitInfo);
  1031.       MaxBit = General_Max((LONGINT)i, (LONGINT)MaxBit);
  1032.       MaxInstCount = General_Max((LONGINT)W_8->InstCount, (LONGINT)MaxInstCount);
  1033.       return;
  1034.     }
  1035.   }
  1036.   if (t->U_1.V_1.Kind == Tree_Child) {
  1037.     for (;;) {
  1038.       {
  1039.         register Tree_yChild *W_9 = &t->U_1.V_9.Child;
  1040.  
  1041.         if (!(((SET_ELEM(Tree_Input) | SET_ELEM(Tree_Test) | SET_ELEM(Tree_Dummy)) & W_9->Properties) == 0X0L)) {
  1042.           goto EXIT_2;
  1043.         }
  1044.         INC(i);
  1045.         gBitIndex->A[W_9->AttrIndex - 1].ToBit = i;
  1046.         gBitIndex->A[i - 1].ToAttr = W_9->AttrIndex;
  1047.         return;
  1048.       }
  1049.     } EXIT_2:;
  1050.   }
  1051.   if (t->U_1.V_1.Kind == Tree_Attribute) {
  1052.     for (;;) {
  1053.       {
  1054.         register Tree_yAttribute *W_10 = &t->U_1.V_10.Attribute;
  1055.  
  1056.         if (!(((SET_ELEM(Tree_Input) | SET_ELEM(Tree_Test) | SET_ELEM(Tree_Dummy)) & W_10->Properties) == 0X0L)) {
  1057.           goto EXIT_3;
  1058.         }
  1059.         INC(i);
  1060.         gBitIndex->A[W_10->AttrIndex - 1].ToBit = i;
  1061.         gBitIndex->A[i - 1].ToAttr = W_10->AttrIndex;
  1062.         return;
  1063.       }
  1064.     } EXIT_3:;
  1065.   }
  1066. }
  1067.  
  1068. static void CompInhIndices
  1069. # ifdef __STDC__
  1070. (Tree_tTree t)
  1071. # else
  1072. (t)
  1073. Tree_tTree t;
  1074. # endif
  1075. {
  1076.   struct S_7 yyTempo;
  1077.  
  1078.   if (t == Tree_NoTree) {
  1079.     return;
  1080.   }
  1081.   if (t->U_1.V_1.Kind == Tree_Class) {
  1082.     {
  1083.       register struct S_8 *W_11 = &yyTempo.U_1.V_1.yyR1;
  1084.  
  1085.       {
  1086.         register Tree_yClass *W_12 = &t->U_1.V_5.Class;
  1087.  
  1088.         {
  1089.           SHORTCARD B_19 = W_12->AttrCount + 1, B_20 = W_12->InstCount;
  1090.  
  1091.           if (B_19 <= B_20)
  1092.             for (j = B_19;; j += 1) {
  1093.               {
  1094.                 register Tree_tInstance *W_13 = &W_12->Instance->A[j - 1];
  1095.  
  1096.                 if (IN(Tree_Inherited, W_13->Properties)) {
  1097.                   W_11->b = ToBit2(t, W_13->Selector, j);
  1098.                   Sets_Include(&InhIndices, (LONGCARD)W_11->b);
  1099.                   INC(InhIndexCount->A[W_11->b - 1]);
  1100.                 }
  1101.               }
  1102.               if (j >= B_20) break;
  1103.             }
  1104.         }
  1105.         return;
  1106.       }
  1107.     }
  1108.   }
  1109. }
  1110.  
  1111. static void CountSynAttr
  1112. # ifdef __STDC__
  1113. (Tree_tTree t)
  1114. # else
  1115. (t)
  1116. Tree_tTree t;
  1117. # endif
  1118. {
  1119.   struct S_9 yyTempo;
  1120.  
  1121.   if (t == Tree_NoTree) {
  1122.     return;
  1123.   }
  1124.   if (t->U_1.V_1.Kind == Tree_Class) {
  1125.     for (;;) {
  1126.       {
  1127.         register Tree_yClass *W_14 = &t->U_1.V_5.Class;
  1128.  
  1129.         if (!((Tree_NoCodeClass & W_14->Properties) == 0X0L)) {
  1130.           goto EXIT_4;
  1131.         }
  1132.         if (!(i <= W_14->BitCount)) {
  1133.           goto EXIT_4;
  1134.         }
  1135.         {
  1136.           register Tree_tInstance *W_15 = &W_14->Instance->A[W_14->BitIndex->A[i - 1].ToAttr - 1];
  1137.  
  1138.           if (SET_IS_SUBSET1(SET_ELEM(Tree_Synthesized) | SET_ELEM(Tree_Left), W_15->Properties) && !IN(Tree_Test, W_15->Properties)) {
  1139.             INC(n);
  1140.           }
  1141.         }
  1142.         return;
  1143.       }
  1144.     } EXIT_4:;
  1145.   }
  1146. }
  1147.  
  1148. static void TypeName
  1149. # ifdef __STDC__
  1150. (Tree_tTree t)
  1151. # else
  1152. (t)
  1153. Tree_tTree t;
  1154. # endif
  1155. {
  1156.   struct S_10 yyTempo;
  1157.  
  1158.   if (t == Tree_NoTree) {
  1159.     return;
  1160.   }
  1161.   if (t->U_1.V_1.Kind == Tree_Class) {
  1162.     for (;;) {
  1163.       {
  1164.         register Tree_yClass *W_16 = &t->U_1.V_5.Class;
  1165.  
  1166.         if (!((Tree_NoCodeClass & W_16->Properties) == 0X0L)) {
  1167.           goto EXIT_5;
  1168.         }
  1169.         if (!IN(Tree_Trace, W_16->Properties)) {
  1170.           goto EXIT_5;
  1171.         }
  1172.         IO_WriteS(Tree_f, (STRING)"\"", 1L);
  1173.         Tree_WI(W_16->Name);
  1174.         IO_WriteS(Tree_f, (STRING)"\",", 2L);
  1175.         IO_WriteNl(Tree_f);
  1176.         return;
  1177.       }
  1178.     } EXIT_5:;
  1179.   }
  1180. }
  1181.  
  1182. static void GenS
  1183. # ifdef __STDC__
  1184. (Tree_tTree t)
  1185. # else
  1186. (t)
  1187. Tree_tTree t;
  1188. # endif
  1189. {
  1190.   struct S_11 yyTempo;
  1191.  
  1192.   if (t == Tree_NoTree) {
  1193.     return;
  1194.   }
  1195.   if (t->U_1.V_1.Kind == Tree_Class) {
  1196.     for (;;) {
  1197.       {
  1198.         register Tree_yClass *W_17 = &t->U_1.V_5.Class;
  1199.  
  1200.         if (!((Tree_NoCodeClass & W_17->Properties) == 0X0L)) {
  1201.           goto EXIT_6;
  1202.         }
  1203.         if (!(i <= W_17->BitCount)) {
  1204.           goto EXIT_6;
  1205.         }
  1206.         {
  1207.           register Tree_tInstance *W_18 = &W_17->Instance->A[W_17->BitIndex->A[i - 1].ToAttr - 1];
  1208.  
  1209.           if (SET_IS_SUBSET1(SET_ELEM(Tree_Synthesized) | SET_ELEM(Tree_Left), W_18->Properties) && !IN(Tree_Test, W_18->Properties)) {
  1210.             EvalC_Class = t;
  1211.             if (n > 1) {
  1212.               IO_WriteS(Tree_f, (STRING)" case k", 7L);
  1213.               Tree_WI(W_17->Name);
  1214.               IO_WriteS(Tree_f, (STRING)":", 1L);
  1215.               IO_WriteNl(Tree_f);
  1216.             }
  1217.             {
  1218.               SHORTCARD B_21 = 1, B_22 = W_17->InstCount;
  1219.  
  1220.               if (B_21 <= B_22)
  1221.                 for (j = B_21;; j += 1) {
  1222.                   if (Relations_IsRelated((LONGINT)W_17->BitIndex->A[i - 1].ToAttr, (LONGINT)j, W_17->DP)) {
  1223.                     GenCall(t, j);
  1224.                   }
  1225.                   if (j >= B_22) break;
  1226.                 }
  1227.             }
  1228.             GenEvalAttr(t, (LONGINT)W_17->BitIndex->A[i - 1].ToAttr);
  1229.             if (!IN(Tree_Input, W_18->Properties) && W_18->Attribute->U_1.V_1.Kind == Tree_Child) {
  1230.               IO_WriteS(Tree_f, (STRING)"{ register ", 11L);
  1231.               Tree_WI(Tree_itTree);
  1232.               IO_WriteS(Tree_f, (STRING)" yyr = yyt->", 12L);
  1233.               Tree_WI(W_17->Name);
  1234.               IO_WriteS(Tree_f, (STRING)".", 1L);
  1235.               Tree_WI(W_18->Attribute->U_1.V_9.Child.Name);
  1236.               IO_WriteS(Tree_f, (STRING)"; if (yyr->yyHead.yyParent == ", 30L);
  1237.               Tree_WI(Tree_iNoTree);
  1238.               IO_WriteS(Tree_f, (STRING)") { yyr->yyHead.yyOffset = ", 27L);
  1239.               Tree_WN((LONGINT)(W_17->BitCount + W_18->Attribute->U_1.V_9.Child.BitOffset));
  1240.               IO_WriteS(Tree_f, (STRING)"; yyr->yyHead.yyParent = yyt; Init", 34L);
  1241.               Tree_WI(Tree_iModule);
  1242.               IO_WriteS(Tree_f, (STRING)" (yyr); } }", 11L);
  1243.               IO_WriteNl(Tree_f);
  1244.             }
  1245.             {
  1246.               SHORTCARD B_23 = 1, B_24 = W_17->InstCount;
  1247.  
  1248.               if (B_23 <= B_24)
  1249.                 for (i2 = B_23;; i2 += 1) {
  1250.                   if (W_17->Instance->A[i2 - 1].Action == W_18->Action) {
  1251.                     {
  1252.                       register Tree_tInstance *W_19 = &W_17->Instance->A[i2 - 1];
  1253.  
  1254.                       if (IN(Tree_Synthesized, W_19->Properties)) {
  1255.                         k = EvalC3_ToBit0(EvalC_Class, (LONGINT)i2);
  1256.                         if (k != i - 1) {
  1257.                           IO_WriteS(Tree_f, (STRING)"  INCL (yyt->yyHead.yyIsComp", 28L);
  1258.                           Tree_WN((LONGINT)(k / TreeC1_BSS));
  1259.                           IO_WriteS(Tree_f, (STRING)", ", 2L);
  1260.                           Tree_WN((LONGINT)(k % TreeC1_BSS));
  1261.                           IO_WriteS(Tree_f, (STRING)");", 2L);
  1262.                           IO_WriteNl(Tree_f);
  1263.                         }
  1264.                       } else if (IN(Tree_Inherited, W_19->Properties)) {
  1265.                         k = ToBit1(W_19->Selector, (LONGINT)(i2 - W_17->AttrCount - W_19->Selector->U_1.V_9.Child.InstOffset));
  1266.                         IO_WriteS(Tree_f, (STRING)"  INCL (yyt->", 13L);
  1267.                         Tree_WI(EvalC_Class->U_1.V_5.Class.Name);
  1268.                         IO_WriteS(Tree_f, (STRING)".", 1L);
  1269.                         Tree_WI(W_19->Selector->U_1.V_9.Child.Name);
  1270.                         IO_WriteS(Tree_f, (STRING)"->yyHead.yyIsComp", 17L);
  1271.                         Tree_WN((LONGINT)(k / TreeC1_BSS));
  1272.                         IO_WriteS(Tree_f, (STRING)", ", 2L);
  1273.                         Tree_WN((LONGINT)(k % TreeC1_BSS));
  1274.                         IO_WriteS(Tree_f, (STRING)");", 2L);
  1275.                         IO_WriteNl(Tree_f);
  1276.                       }
  1277.                     }
  1278.                   }
  1279.                   if (i2 >= B_24) break;
  1280.                 }
  1281.             }
  1282.             if (n > 1) {
  1283.               IO_WriteS(Tree_f, (STRING)"  break;", 8L);
  1284.               IO_WriteNl(Tree_f);
  1285.             }
  1286.           }
  1287.         }
  1288.         return;
  1289.       }
  1290.     } EXIT_6:;
  1291.   }
  1292. }
  1293.  
  1294. static void GenE
  1295. # ifdef __STDC__
  1296. (Tree_tTree t)
  1297. # else
  1298. (t)
  1299. Tree_tTree t;
  1300. # endif
  1301. {
  1302.   struct S_12 yyTempo;
  1303.  
  1304.   if (t == Tree_NoTree) {
  1305.     return;
  1306.   }
  1307.   if (t->U_1.V_1.Kind == Tree_Class) {
  1308.     {
  1309.       register struct S_13 *W_20 = &yyTempo.U_1.V_1.yyR1;
  1310.  
  1311.       {
  1312.         register Tree_yClass *W_21 = &t->U_1.V_5.Class;
  1313.  
  1314.         TreeC2_GetIterator(t);
  1315.         n = 0;
  1316.         j = 2;
  1317.         for (;;) {
  1318.           if (j > W_21->InstCount) {
  1319.             goto EXIT_7;
  1320.           }
  1321.           {
  1322.             register Tree_tInstance *W_22 = &W_21->Instance->A[j - 1];
  1323.  
  1324.             if (((SET_ELEM(Tree_Dummy) | SET_ELEM(Tree_Output) | SET_ELEM(Tree_Test)) & W_22->Properties) != 0X0L) {
  1325.               if (IN(Tree_Test, W_22->Properties) || SET_IS_SUBSET1(SET_ELEM(Tree_Synthesized) | SET_ELEM(Tree_Left), W_22->Properties) || SET_IS_SUBSET1(SET_ELEM(Tree_Inherited) | SET_ELEM(Tree_Right), W_22->Properties) || SET_IS_SUBSET1(SET_ELEM(Tree_Inherited) | SET_ELEM(Tree_Left), W_22->Properties) && !IN(Tree_Input, W_22->Properties) && W_22->Attribute->U_1.V_1.Kind == Tree_Child || SET_IS_SUBSET1(SET_ELEM(Tree_Synthesized) | SET_ELEM(Tree_Right) | SET_ELEM(Tree_Dummy), W_22->Properties) && W_22->Selector != TreeC2_Iterator && IN(Tree_HasOutput, W_22->Selector->U_1.V_9.Child.Class->U_1.V_5.Class.Properties)) {
  1326.                 INC(n);
  1327.                 goto EXIT_7;
  1328.               }
  1329.             }
  1330.           }
  1331.           INC(j);
  1332.         } EXIT_7:;
  1333.         if (n == 0 && (TreeC2_Iterator == Tree_NoTree || !IN(Tree_HasOutput, TreeC2_Iterator->U_1.V_9.Child.Class->U_1.V_5.Class.Properties))) {
  1334.           return;
  1335.         }
  1336.         EvalC_Class = t;
  1337.         IO_WriteS(Tree_f, (STRING)"  case k", 8L);
  1338.         Tree_WI(W_21->Name);
  1339.         IO_WriteS(Tree_f, (STRING)":", 1L);
  1340.         IO_WriteNl(Tree_f);
  1341.         {
  1342.           SHORTCARD B_25 = 2, B_26 = W_21->InstCount;
  1343.  
  1344.           if (B_25 <= B_26)
  1345.             for (j = B_25;; j += 1) {
  1346.               {
  1347.                 register Tree_tInstance *W_23 = &W_21->Instance->A[j - 1];
  1348.  
  1349.                 if (((SET_ELEM(Tree_Dummy) | SET_ELEM(Tree_Output)) & W_23->Properties) != 0X0L) {
  1350.                   if (SET_IS_SUBSET1(SET_ELEM(Tree_Synthesized) | SET_ELEM(Tree_Left), W_23->Properties) || SET_IS_SUBSET1(SET_ELEM(Tree_Inherited) | SET_ELEM(Tree_Right), W_23->Properties) || SET_IS_SUBSET1(SET_ELEM(Tree_Inherited) | SET_ELEM(Tree_Left), W_23->Properties) && !IN(Tree_Input, W_23->Properties) && W_23->Attribute->U_1.V_1.Kind == Tree_Child) {
  1351.                     GenCall(t, j);
  1352.                   } else if (SET_IS_SUBSET1(SET_ELEM(Tree_Synthesized) | SET_ELEM(Tree_Right) | SET_ELEM(Tree_Dummy), W_23->Properties) && W_23->Selector != TreeC2_Iterator && IN(Tree_HasOutput, W_23->Selector->U_1.V_9.Child.Class->U_1.V_5.Class.Properties)) {
  1353.                     if (Sets_IsElement(ORD('Z'), &Tree_Options) && IN(Tree_Trace, t->U_1.V_5.Class.Properties)) {
  1354.                       IO_WriteS(Tree_f, (STRING)"yyWriteVisit (yyt, \"", 20L);
  1355.                       Tree_WI(W_23->Selector->U_1.V_9.Child.Name);
  1356.                       IO_WriteS(Tree_f, (STRING)"\"); ", 4L);
  1357.                     }
  1358.                     IO_WriteS(Tree_f, (STRING)"yyE (yyt->", 10L);
  1359.                     Tree_WI(W_21->Name);
  1360.                     IO_WriteS(Tree_f, (STRING)".", 1L);
  1361.                     Tree_WI(W_23->Selector->U_1.V_9.Child.Name);
  1362.                     IO_WriteS(Tree_f, (STRING)");", 2L);
  1363.                     IO_WriteNl(Tree_f);
  1364.                     if (Sets_IsElement(ORD('Z'), &Tree_Options) && IN(Tree_Trace, t->U_1.V_5.Class.Properties)) {
  1365.                       IO_WriteS(Tree_f, (STRING)"yyVisitParent (yyt->", 20L);
  1366.                       Tree_WI(W_21->Name);
  1367.                       IO_WriteS(Tree_f, (STRING)".", 1L);
  1368.                       Tree_WI(W_23->Selector->U_1.V_9.Child.Name);
  1369.                       IO_WriteS(Tree_f, (STRING)");", 2L);
  1370.                       IO_WriteNl(Tree_f);
  1371.                     }
  1372.                   }
  1373.                 }
  1374.               }
  1375.               if (j >= B_26) break;
  1376.             }
  1377.         }
  1378.         Sets_MakeSet(&W_20->ToCompute, (LONGCARD)W_21->InstCount);
  1379.         {
  1380.           SHORTCARD B_27 = 2, B_28 = W_21->AttrCount;
  1381.  
  1382.           if (B_27 <= B_28)
  1383.             for (i = B_27;; i += 1) {
  1384.               {
  1385.                 register Tree_tInstance *W_24 = &W_21->Instance->A[i - 1];
  1386.  
  1387.                 if (IN(Tree_Test, W_24->Properties)) {
  1388.                   {
  1389.                     SHORTCARD B_29 = 2, B_30 = W_21->InstCount;
  1390.  
  1391.                     if (B_29 <= B_30)
  1392.                       for (j = B_29;; j += 1) {
  1393.                         if (Relations_IsRelated((LONGINT)i, (LONGINT)j, W_21->DP)) {
  1394.                           if (((SET_ELEM(Tree_Synthesized) | SET_ELEM(Tree_Inherited)) & W_21->Instance->A[j - 1].Properties) != 0X0L) {
  1395.                             Sets_Include(&W_20->ToCompute, (LONGCARD)j);
  1396.                           }
  1397.                         }
  1398.                         if (j >= B_30) break;
  1399.                       }
  1400.                   }
  1401.                 }
  1402.               }
  1403.               if (i >= B_28) break;
  1404.             }
  1405.         }
  1406.         {
  1407.           SHORTCARD B_31 = 2, B_32 = W_21->InstCount;
  1408.  
  1409.           if (B_31 <= B_32)
  1410.             for (i = B_31;; i += 1) {
  1411.               {
  1412.                 register Tree_tInstance *W_25 = &W_21->Instance->A[i - 1];
  1413.  
  1414.                 if (SET_IS_SUBSET1(SET_ELEM(Tree_Synthesized) | SET_ELEM(Tree_Left) | SET_ELEM(Tree_Output), W_25->Properties) || SET_IS_SUBSET1(SET_ELEM(Tree_Inherited) | SET_ELEM(Tree_Right) | SET_ELEM(Tree_Output), W_25->Properties)) {
  1415.                   Sets_Exclude(&W_20->ToCompute, (LONGCARD)i);
  1416.                 }
  1417.               }
  1418.               if (i >= B_32) break;
  1419.             }
  1420.         }
  1421.         while (!Sets_IsEmpty(W_20->ToCompute)) {
  1422.           GenCall(t, (SHORTCARD)Sets_Extract(&W_20->ToCompute));
  1423.         }
  1424.         Sets_ReleaseSet(&W_20->ToCompute);
  1425.         {
  1426.           SHORTCARD B_33 = 2, B_34 = W_21->AttrCount;
  1427.  
  1428.           if (B_33 <= B_34)
  1429.             for (i = B_33;; i += 1) {
  1430.               if (IN(Tree_Test, W_21->Instance->A[i - 1].Properties)) {
  1431.                 GenEvalAttr(t, (LONGINT)i);
  1432.               }
  1433.               if (i >= B_34) break;
  1434.             }
  1435.         }
  1436.         if (TreeC2_Iterator == Tree_NoTree || !IN(Tree_HasOutput, TreeC2_Iterator->U_1.V_9.Child.Class->U_1.V_5.Class.Properties)) {
  1437.           IO_WriteS(Tree_f, (STRING)"return;", 7L);
  1438.           IO_WriteNl(Tree_f);
  1439.         } else {
  1440.           if (Sets_IsElement(ORD('Z'), &Tree_Options) && IN(Tree_Trace, t->U_1.V_5.Class.Properties)) {
  1441.             IO_WriteS(Tree_f, (STRING)"yyWriteVisit (yyt, \"", 20L);
  1442.             Tree_WI(TreeC2_Iterator->U_1.V_9.Child.Name);
  1443.             IO_WriteS(Tree_f, (STRING)"\"); ", 4L);
  1444.           }
  1445.           IO_WriteS(Tree_f, (STRING)"yyt = yyt->", 11L);
  1446.           Tree_WI(W_21->Name);
  1447.           IO_WriteS(Tree_f, (STRING)".", 1L);
  1448.           Tree_WI(TreeC2_Iterator->U_1.V_9.Child.Name);
  1449.           IO_WriteS(Tree_f, (STRING)"; break;", 8L);
  1450.           IO_WriteNl(Tree_f);
  1451.         }
  1452.         return;
  1453.       }
  1454.     }
  1455.   }
  1456. }
  1457.  
  1458. static void CompOutput
  1459. # ifdef __STDC__
  1460. (Tree_tTree t)
  1461. # else
  1462. (t)
  1463. Tree_tTree t;
  1464. # endif
  1465. {
  1466.   struct S_14 yyTempo;
  1467.  
  1468.   if (t == Tree_NoTree) {
  1469.     return;
  1470.   }
  1471.   if (t->U_1.V_1.Kind == Tree_Class) {
  1472.     for (;;) {
  1473.       {
  1474.         register Tree_yClass *W_26 = &t->U_1.V_5.Class;
  1475.  
  1476.         if (!!IN(Tree_HasOutput, W_26->Properties)) {
  1477.           goto EXIT_8;
  1478.         }
  1479.         Success = FALSE;
  1480.         Tree_ForallAttributes(t, (Tree_ProcOfT)CompOutput);
  1481.         Tree_ForallClasses(W_26->Extensions, (Tree_ProcOfT)CompOutput2);
  1482.         if (!Success) {
  1483.           goto EXIT_8;
  1484.         }
  1485.         INCL(W_26->Properties, Tree_HasOutput);
  1486.         IsStable = FALSE;
  1487.         return;
  1488.       }
  1489.     } EXIT_8:;
  1490.   }
  1491.   if (t->U_1.V_1.Kind == Tree_Child) {
  1492.     for (;;) {
  1493.       {
  1494.         register Tree_yChild *W_27 = &t->U_1.V_9.Child;
  1495.  
  1496.         if (!(IN(Tree_Output, W_27->Properties) || IN(Tree_HasOutput, W_27->Class->U_1.V_5.Class.Properties))) {
  1497.           goto EXIT_9;
  1498.         }
  1499.         Success = TRUE;
  1500.         return;
  1501.       }
  1502.     } EXIT_9:;
  1503.   }
  1504.   if (t->U_1.V_1.Kind == Tree_Attribute) {
  1505.     for (;;) {
  1506.       {
  1507.         register Tree_yAttribute *W_28 = &t->U_1.V_10.Attribute;
  1508.  
  1509.         if (!(((SET_ELEM(Tree_Test) | SET_ELEM(Tree_Output)) & W_28->Properties) != 0X0L)) {
  1510.           goto EXIT_10;
  1511.         }
  1512.         Success = TRUE;
  1513.         return;
  1514.       }
  1515.     } EXIT_10:;
  1516.   }
  1517. }
  1518.  
  1519. static void CompOutput2
  1520. # ifdef __STDC__
  1521. (Tree_tTree t)
  1522. # else
  1523. (t)
  1524. Tree_tTree t;
  1525. # endif
  1526. {
  1527.   struct S_15 yyTempo;
  1528.  
  1529.   if (t == Tree_NoTree) {
  1530.     return;
  1531.   }
  1532.   if (t->U_1.V_1.Kind == Tree_Class) {
  1533.     for (;;) {
  1534.       {
  1535.         register Tree_yClass *W_29 = &t->U_1.V_5.Class;
  1536.  
  1537.         if (!IN(Tree_HasOutput, W_29->Properties)) {
  1538.           goto EXIT_11;
  1539.         }
  1540.         Success = TRUE;
  1541.         return;
  1542.       }
  1543.     } EXIT_11:;
  1544.   }
  1545. }
  1546.  
  1547. INTEGER EvalC3_ToBit0
  1548. # ifdef __STDC__
  1549. (Tree_tTree yyP2, INTEGER yyP1)
  1550. # else
  1551. (yyP2, yyP1)
  1552. Tree_tTree yyP2;
  1553. INTEGER yyP1;
  1554. # endif
  1555. {
  1556.   struct S_16 yyTempo;
  1557.  
  1558.   return yyP2->U_1.V_5.Class.BitIndex->A[yyP1 - 1].ToBit - 1;
  1559. }
  1560.  
  1561. static INTEGER ToBit1
  1562. # ifdef __STDC__
  1563. (Tree_tTree yyP4, INTEGER yyP3)
  1564. # else
  1565. (yyP4, yyP3)
  1566. Tree_tTree yyP4;
  1567. INTEGER yyP3;
  1568. # endif
  1569. {
  1570.   struct S_17 yyTempo;
  1571.  
  1572.   return yyP4->U_1.V_9.Child.Class->U_1.V_5.Class.BitIndex->A[yyP3 - 1].ToBit - 1;
  1573. }
  1574.  
  1575. static INTEGER ToBit2
  1576. # ifdef __STDC__
  1577. (Tree_tTree yyP7, Tree_tTree yyP6, SHORTCARD yyP5)
  1578. # else
  1579. (yyP7, yyP6, yyP5)
  1580. Tree_tTree yyP7;
  1581. Tree_tTree yyP6;
  1582. SHORTCARD yyP5;
  1583. # endif
  1584. {
  1585.   struct S_18 yyTempo;
  1586.  
  1587.   {
  1588.     register struct S_19 *W_30 = &yyTempo.U_1.V_1.yyR1;
  1589.  
  1590.     {
  1591.       register Tree_yChild *W_31 = &yyP6->U_1.V_9.Child;
  1592.  
  1593.       return yyP7->U_1.V_5.Class.BitCount + W_31->BitOffset + W_31->Class->U_1.V_5.Class.BitIndex->A[yyP5 - yyP7->U_1.V_5.Class.AttrCount - W_31->InstOffset - 1].ToBit - 1;
  1594.     }
  1595.     return W_30->yyV1;
  1596.   }
  1597. }
  1598.  
  1599. static INTEGER ToAttr
  1600. # ifdef __STDC__
  1601. (Tree_tTree yyP9, INTEGER yyP8)
  1602. # else
  1603. (yyP9, yyP8)
  1604. Tree_tTree yyP9;
  1605. INTEGER yyP8;
  1606. # endif
  1607. {
  1608.   SHORTCARD a;
  1609.   struct S_20 yyTempo;
  1610.  
  1611.   {
  1612.     register struct S_21 *W_32 = &yyTempo.U_1.V_1.yyR1;
  1613.  
  1614.     {
  1615.       register Tree_yClass *W_33 = &yyP9->U_1.V_5.Class;
  1616.  
  1617.       {
  1618.         SHORTCARD B_35 = W_33->AttrCount + 1, B_36 = W_33->InstCount;
  1619.  
  1620.         if (B_35 <= B_36)
  1621.           for (a = B_35;; a += 1) {
  1622.             {
  1623.               register Tree_tInstance *W_34 = &W_33->Instance->A[a - 1];
  1624.  
  1625.               if (((SET_ELEM(Tree_Input) | SET_ELEM(Tree_Test) | SET_ELEM(Tree_Dummy)) & W_34->Properties) == 0X0L && ToBit2(yyP9, W_34->Selector, a) == yyP8) {
  1626.                 return a;
  1627.               }
  1628.             }
  1629.             if (a >= B_36) break;
  1630.           }
  1631.       }
  1632.     }
  1633.     return 0;
  1634.     return W_32->yyV1;
  1635.   }
  1636. }
  1637.  
  1638. void EvalC3_BeginEvalC3
  1639. # ifdef __STDC__
  1640. ()
  1641. # else
  1642. ()
  1643. # endif
  1644. {
  1645. }
  1646.  
  1647. void EvalC3_CloseEvalC3
  1648. # ifdef __STDC__
  1649. ()
  1650. # else
  1651. ()
  1652. # endif
  1653. {
  1654. }
  1655.  
  1656. static void yyExit
  1657. # ifdef __STDC__
  1658. ()
  1659. # else
  1660. ()
  1661. # endif
  1662. {
  1663.   IO_CloseIO();
  1664.   Exit(1L);
  1665. }
  1666.  
  1667. void BEGIN_EvalC3()
  1668. {
  1669.   static BOOLEAN has_been_called = FALSE;
  1670.  
  1671.   if (!has_been_called) {
  1672.     has_been_called = TRUE;
  1673.  
  1674.     BEGIN_IO();
  1675.     BEGIN_Tree();
  1676.     BEGIN_System();
  1677.     BEGIN_IO();
  1678.     BEGIN_Tree();
  1679.     BEGIN_General();
  1680.     BEGIN_DynArray();
  1681.     BEGIN_IO();
  1682.     BEGIN_Texts();
  1683.     BEGIN_Sets();
  1684.     BEGIN_Relations();
  1685.     BEGIN_TreeC1();
  1686.     BEGIN_TreeC2();
  1687.     BEGIN_EvalC();
  1688.     BEGIN_Errors();
  1689.     BEGIN_Positions();
  1690.     BEGIN_EvalC();
  1691.     BEGIN_Tree();
  1692.  
  1693.     EvalC3_yyf = IO_StdOutput;
  1694.     EvalC3_Exit = yyExit;
  1695.     EvalC3_BeginEvalC3();
  1696.   }
  1697. }
  1698.